import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server:{
    port:80,
    host:'localhost',
    open:true,
    proxy: {
      '/api': {
        target: 'http://localhost:8080/',  // 接口源地址
        changeOrigin: true,   // 开启跨域
        rewrite: (path) => path.replace(/^\/api/, ''),
      }
    }
  }
})
